package main

import "fmt"

//全局变量
var n7 = 100
var n8 = 9.7

var (
	n9  = 500
	n10 = 6.8
)

func main() {
	var num1 int = 18
	fmt.Println("num1:", num1)

	var num2 int
	fmt.Println("num2:", num2)

	var num3 = "tom"
	fmt.Println("num3:", num3)

	sex := "男"
	fmt.Println("sex:", sex)

	//声明多个变量
	var n1, n2, n3 int
	fmt.Println("n1:", n1, "n2:", n2, "n3:", n3)

	var n4, name1, n5 = 100, "tom", 7.8
	fmt.Println("n4:", n4, "name1:", name1, "n5:", n5)

	n6, height := 6.9, 100.6
	fmt.Println("n6:", n6, "height:", height)

	fmt.Println("n7:", n7, "n8:", n8)
	fmt.Println("n9:", n9, "n10:", n10)
}
